package com.ytzl.common;

/**
 * @Author: ThinkPad
 * @Creation: 2021/9/15 11:20
 * @Desc: 状态码管理
 */
public enum CodeResultEnums {
    //通用的状态码
    SUCCESS(200,"成功"),
    ERROR(400,"失败"),

    //自定义的状态码
    USER_CODE_EXIST(50001,"用户登录信息有误"),
    INPUT_PARAMS_IS_EMPTY(50002,"用户名或密码为空"),
    USER_NOT_EXSITS(50003,"用户不存在"),

    CITY_ID_IS_NULL(20004,"城市id不能为空"),

    TOKEN_LOSE_EFFICACY(100000,"token失效，请重登录"),
    //添加
    NEW_LINK_USER_ERROR(100411,"新增常用联系人失败"),
    SUBMIT_IS_EMPTY(100412,"不能提交空，请填写常用联系人信息"),
    //删除
    UNABLE_TO_DELETE(100431,"所选的常用联系人中有与某条待支付的订单关联的项，无法删除"),
    FAIL_TO_DELETE(100432,"删除常用联系人失败"),
    NO_CHOICE(100433,"请选择要删除的常用联系人"),
    //查询
    FAIL_TO_GET(100401,"获取常用联系人信息失败"),
    FAIL_TO_MODIFY(100421,"修改常用联系人失败"),
    CAN_NOT_BE_EMPTY(100422 ,"不能提交空，请填写常用联系人信息"),

    ;
    private Integer code;
    private String massage;


    CodeResultEnums(Integer code, String massage) {
        this.code = code;
        this.massage = massage;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMassage() {
        return massage;
    }

    public void setMassage(String massage) {
        this.massage = massage;
    }
}
